﻿@model FILSTARTUPS_MOBILE.Models.CategoryPostArticle

@{
    ViewBag.Title = "Articles";
       if (User.Identity.IsAuthenticated)
    {
        Layout = "~/Views/Shared/_Layout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_LayoutNonMember.cshtml";
    }
}

@section Nav
{
   @foreach(var nav in Model.PageNav)
   {
    <li><a href="Page?pageidPK=@nav.pageidPK&pagename=@nav.pagename">@nav.pagename</a></li>
   }
}

@section SubNav
{
<div data-role="navbar" data-grid="d" >
		<ul>
        @if(Model.CatInfo == null)
            {
               
            }
        else
            {
                foreach (var sub in Model.CatInfo) 
            {
            <li>@Html.ActionLink(sub.categoryname, "Article", new { catid = sub.catidPK })</li>
        }
		}	
		</ul>
	</div><!-- /navbar -->
}
   <!--- POST_TITLE --->
            <h2>@Model.categorypost.posttitle</h2>
       
           <div class="content-textbox">
	                @Html.Raw(Model.categorypost.postdescription)
	       </div>
@if (User.Identity.IsAuthenticated)
{
    
        
     foreach (var comment in Model.Comments)
     {
            <div id="comments_div">
            <div  class="content-textbox"  style="min-height:30px;height:auto">
            
                    posted by:@comment.membername
                    <br />
                    dateposted:@comment.dateposted
                    <br />
                    Comment:@comment.postdescription

            </div>
            </div>
     }

 //using (Ajax.BeginForm("Comment", "Home", new AjaxOptions{
 //       UpdateTargetId="comments_div",
 //       HttpMethod="GET",
 //       InsertionMode=InsertionMode.Replace
 //},new { id = Model.categorypost.postidPK }))
   
    <form action="/Home/Comment?id=@Model.categorypost.postidPK" method="get">
        <div>
           <textarea rows="5" name="comment" id="comment" ></textarea>

         <div data-role="controlgroup" data-type="horizontal">
            <input type="submit" data-inline="true" value="Comment" />
            <a href="Index" data-role="button" >Cancel</a>
          </div>
        </div>
    </form>
}


   <!---    
            <div class="details">
              
                  <p><span class="bold">Location:</span> Thomas Hooker Brewery (<a title="google map for easy directions" href="http://maps.google.com/maps?f=l&amp;hl=en&amp;geocode=&amp;q=thomas+hooker+brewery&amp;near=&amp;sll=41.767878,-72.692089&amp;sspn=0.190257,0.244789&amp;ie=UTF8&amp;ll=41.845524,-72.69207&amp;spn=0.186958,0.300751&amp;z=12&amp;iwloc=A&amp;iwstate1=dir">map</a>)</p>
		          <p><span class="bold">Dates:</span> 1st and 3rd Friday of every month</p>
		          <p><span class="bold">Time:</span> 5-8pm</p>
            </div> --->
            <!-- POST_DESCRIPTION --->